/*
Script: Var.js
*/

/*
Section: Variables
*/

/*
Int: gridSize
	defines the grid size in px

	Used for positioning and dragging.
*/
var gridSize = 120;

/*
Array: posMatrix
	holds position of all adopted boxes

	Must be updated on creation, destruction and moving of boxes and is	needed for DnD logic, top left is [0][0] and bottom right is [7][4]. See also <blockPos()>, <checkPos()>
*/
var posMatrix = [
					[null, null, null, null, null],
					[null, null, null, null, null],
					[null, null, null, null, null],
					[null, null, null, null, null],
					[null, null, null, null, null],
					[null, null, null, null, null],
					[null, null, null, null, null],
					[null, null, null, null, null]
				];

/*
Hash: elemPos
	store element positions
*/
var elemPos = new Hash();

/*
Hash: sedusPrefs
	user preferences saved in cookie

Cookie:
	serialized variable is stored in cookie
*/
var sedusPrefs = new Hash.Cookie('sPrefs17', {
	'path': '/',
	'duration': 90,
	'autoSave': true
});

	var savedPics = new Hash.Cookie('sPrefsPics01', {
		'path': '/',
		'duration': 90,
		'autoSave': true
	});


/*
Hash: sedusSaved
	user saved boxes

Cookie:
	serialized variable is stored in cookie
*/
var sedusSaved = new Hash.Cookie('sSaved01', {
	'path': '/',
	'duration': 90,
	'autoSave': true
});

/*
Obj: dropCont
	saved container for <dropin()>, see also <dropout()>
 */
var dropCont;

/*
Str: imgPath
	path to shadow images
*/
var imgPath = '/se/global/layout/img/';

/*
Array: dragElemPos
	array to store element offset before dragging in, learn more in <beDraggable()>
*/
var dragElemPos = [0, 0];

/*
Variable: myPage
	top element (container), initialized by <initMain()>
*/
var myPage;

/*
Variable: tcCont
	tag cloud container, see also <initMain()>
*/
var tcCont;

/*
Hash: pageOffset
	<myPage> container offset
*/
var pageOffset = {
	'top': 22,
	'left': 25
};

/*
Variable: myFrame
	iframe to handle data transfers, initialized by <initMain()>

	see also: <fetchNewBox()>, <fetchIndex()>
*/
var myFrame;

/*
Variable: dragHelper
	container which is movved on box DnD to show drop position
*/
var dragHelper;

/*
Variables: btm_left, btm_right, btm, rgt, rgt_top, drag_overlay, dragger, dragger_left, dragger_right
	needed for boxes, initialized by <initDnD()>
*/
var drag_overlay, dragger, dragger_left, dragger_right;

var sPos = [[], [], [], [], [], [], []];
